<!DOCTYPE html>
<html lang="zh-cn" dir="ltr">
<head>
    <script type="text/javascript" src="<?=base_url().'resource/js/jquery.min.js'?>" ></script>
    <meta charset="UTF-8" />
    <title>打印条形码</title>
    <style type="text/css">
        body{
            page-break-after:always;
        }
        .printItem{
            height: 25mm;
            width: 45mm;
            text-align: center;
            font-size: 13px;
            overflow: hidden;

            margin-bottom: 2mm;
        }
        .print_content{
            width: 150px;
            margin: 5px;
        }
        .print_footer{
            margin-top: 10px;
        }

    </style>
</head>

<body >


<?php foreach ($barcodeList as $key=>$rs): ?>
<div class="printItem">
    <div class="print_title">test z.</div>
    <div class="print_content"><?=$rs['barcode']?></div>
    <div class="print_footer">Date:<?=date('y-m-d H:i:s')?></div>
</div>
<?php endforeach; ?>




<input id='btnPrint' type='button' value='打印' />
<script type="application/javascript">
    $('#btnPrint').click(function(){
        $(this).css({display:'none'});
        window.print();
        $(this).css({display:'block'}).val('重新打印');
    });
</script>
</body>

</html>

